package com.uuah.server.api;

import com.uuah.exception.AbstractUuahException;
import com.uuah.server.api.component.service.IService;
import com.uuah.server.api.endpoint.IUuahEndpoint;
import com.uuah.server.api.session.IUuahSession;
import com.uuah.server.exception.transformer.TransformerException;

public interface IUuahEvent {
	int TIMEOUT_WAIT_FOREVER = 0;
	int TIMEOUT_DO_NOT_WAIT = -1;
	int TIMEOUT_NOT_SET_VALUE = Integer.MIN_VALUE;//

	IUuahMessage getMessage();

	byte[] getMessageAsBytes() throws AbstractUuahException;

	Object transformMessage() throws TransformerException;

	Object transformMessage(Class outputType) throws TransformerException;

	byte[] transformMessageToBytes() throws TransformerException;

	String transformMessageToString() throws TransformerException;

	String getMessageAsString() throws AbstractUuahException;

	String getMessageAsString(String encoding) throws AbstractUuahException;

	String getId();

	Object getProperty(String name, boolean exhaustiveSearch);

	Object getProperty(String name, Object defaultValue,
			boolean exhaustiveSearch);

	IUuahEndpoint getEndpoint();

	IUuahSession getSession();

	IService getService();

	boolean isSynchronous();

	void setSynchronous(boolean value);

	int getTimeout();

	void setTimeout(int timeout);

	String getEncoding();

	IUuahContext getUuahContext();
}
